<!DOCTYPE html>
<html lang="zh">
<head>
	<th:block th:include="include :: header('打印测试')" />
</head>
<!--<style>-->
<!--    div{-->
<!--        border: red solid 1px;-->
<!--    }-->
<!--</style>-->
<body class="gray-bg">
    <div class="container-div">
        <div class="row">
            <div class="col-md-12 search-collapse">
                <p class="select-title">
                    新增销售订单：
                    <span id="order_id" th:text="${iiid}" class="label label-info" style="font-size: 16px"></span>
                </p>
                <div class="row col-sm-12">
                    <div class="select-list">
                        <ul id="hh_user_name">
                            <li class="col">
                                客户名称：<select class="worker"><option value="">水电师傅</option></select>
                            </li>
                            <li class="col">
                                <select class="router"><option value="">客户名称</option></select>
                            </li>
                            <li class="col">
                                联系方式：<input type="text" name="hh_user_phone"/>
                            </li>
                            <li class="pull-right">
                                <button class="btn btn-primary dim " type="button" onclick="getText()"><i class="fa fa-calendar-check-o"></i>开单</button>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="row col-sm-12">
                    <div class="select-list">
                        <ul id="hh_user_phone">
                            <li class="col">
                                开单日期：<input type="text" id="laydate-demo" th:value="${#dates.format(new java.util.Date(), 'yyyy-MM-dd')}">
                            </li>
                            <li class="col">
                                备注：<input type="text" name="hh_remark"/>
                            </li>
                            <li class="pull-right">
                                <button class="btn btn-success dim " type="button"><i class="fa fa-print"></i>打印</button>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="col-md-12 search-collapse">
                <div class="btn-group-sm" id="toolbar" role="group">
                    <a class="btn btn-success" onclick="$.operate.add()">
                        <i class="fa fa-plus"></i> 新增商品
                    </a>
                </div>
                <div class="row">
                    <div class="col-sm-12 select-table table-striped">
                        <table id="table1"></table>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var datas = [[${@dict.getType('sys_normal_disable')}]];
        $(function(){
            var options = {
                data: [{"userId":1,"userCode":"-","userName":"-","userSex":"-","userPhone":"-","userEmail":"-","userBalance":150.0,"status":"-","createTime":"-"}],
                id: "table1",
                createUrl: "add",
                sidePagination: "client",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                columns: [{
                    checkbox: true
                },
                    {
                        field : 'userId',
                        title : '序号'
                    },
                    {
                        field : 'userCode',
                        title : '商品名'
                    },
                    {
                        field : 'userName',
                        title : '单位'
                    },
                    {
                        field : 'userPhone',
                        title : '数量'
                    },
                    {
                        field : 'userEmail',
                        title : '单价'
                    },
                    {
                        field : 'userBalance',
                        title : '用户余额'
                    },
                    {
                        field: 'status',
                        title: '用户状态',
                        align: 'center',
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(datas, value);
                        }
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function(value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
                            actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
                            return actions.join('');
                        }
                    }]
            };
            $.table.init(options);
        });
    </script>
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        function getText(){
            alert($('#order_id').text())
        }

        $(function(){
            layui.use('laydate', function(){
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#laydate-demo',
                    type: 'date'
                });
            });
        });
    </script>
</body>
</html>
